import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;


public class SundialGnomonTest {

	
    /*
     * Test a height less than 500
     */
    @Test(expected = Exception.class)
    public void testHeightException() throws Exception {
            double latitude = 45.0;
           
            SundialGnomon sg = new SundialGnomon(499, latitude);
    }
    
    
    /*
     * Test a latitude less than 10
     */
    @Test(expected = Exception.class)
    public void testLatitudeLessException() throws Exception {
            double latitude = 9.0;
           
            SundialGnomon sg = new SundialGnomon(500, latitude);
    }
   
   
    /*
     * Test a latitude greater than 80
     */
    @Test(expected = Exception.class)
    public void testLatitudeGreaterException() throws Exception {
            double latitude = 81.0;    
            SundialGnomon sg = new SundialGnomon(500, latitude);
    }
    
    /*
     * Test that latitude equals the gnomon angle
     */
    @Test
    public void testLatitude() throws Exception {
            double latitude = 45.0;
           
            SundialGnomon sg = new SundialGnomon(500, latitude);
            assertTrue(latitude == sg.gnomonAngle);
    }

}
